package cn.jhh.base.model;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.util.List;

/**
 * @description TODO
 * @author Mr.M
 * @date 2022/10/7 16:17
 * @version 1.0
 */
 @Data
 @ToString
public class PageResult<T> {
  @ApiModelProperty(value="数据列表")
  private List<T> items;
  @ApiModelProperty(value="总记录数",example = "0")
  private long counts;
  @ApiModelProperty(value="当前页码",example = "1")
  private long page;
  @ApiModelProperty(value="每页记录数",example = "0")
  private long pageSize;

  public PageResult(List<T> items, long counts, long page, long pageSize) {
   this.items = items;
   this.counts = counts;
   this.page = page;
   this.pageSize = pageSize;
  }

 }
